<template>
    <div>
        <navigationBar :bgType="3" :backType="2" navigationTitle="推广海报" />
        <view class="tips"> 请长按保存海报 </view>
        <img :src="poster" class="poster" />
    </div>
</template>
<script>
export default {
    data() {
        return {
            poster: "",
        };
    },

    onLoad(options) {
        this.poster = options.image;
    },

    methods: {
        save() {
            uni.saveImageToPhotosAlbum({
                filePath: this.poster,
                success: () => {
                    uni.showToast({
                        title: "保存成功",
                        icon: "none",
                    });
                },
                fail: () => {
                    uni.showToast({
                        title: "保存失败",
                        icon: "none",
                    });
                },
            });
        },
    },
};
</script>
<style lang="scss" scoped>
.poster {
    width: 100%;
}
.tips {
    text-align: center;
    font-size: 28rpx;
    color: #b0b0b0;
    margin: 30rpx 0;
}
.btns {
    background: white;
    width: 100vw;
    height: 130rpx;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.1);

    .btn {
        position: absolute;
        height: 80rpx;
        line-height: 80rpx;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        background: $grad-theme-color;
        border-radius: 40rpx;
        color: white;
        text-align: center;
        font-size: 30rpx;
    }
}
</style>